import request from '@/utils/request'

const api = {
	loginPassword: '/auth/login',
	code: '/code',
	loginByCode:'/auth/loginByCode',
	loginByPhone:'/auth/loginByPhone'
}

// 密码账号登录
export function loginPassword(data) {
	return request.post(api.loginPassword, data)
}

// 手机短信验证码登录
export function loginByCode(data) {
	return request.post(api.loginByCode, data)
}

// 获手机短信验证码
export function getPhoneCode(params) {
	return request.get(api.loginByPhone,params)
}

// 获取图形验证码
export function getCodeImg() {
	return request.get(api.code)
}